Invest Button API
📋 Purpose
The Invest Button API enables users to execute trades directly. Any fintech company (Publisher) mapped to a broker in ODIN Connector can integrate this API to execute trades and allow BUY/SELL order placement through their portal.
🛣️ Flow
When a user clicks BUY/SELL for any scrip/basket from the Publisher portal:
- The user is redirected to the ODIN Connector Basket page.
- After successful order placement, the user is redirected back to the Publisher website.
- Valid session: Direct redirect to connector basket page.
- Invalid session: Message displayed — "Invalid session. Please login with your broker and try it."
The callback URL shares parameters including partner id, user session, scrip name, quantity, price, and single/multiple scrip details.
💰 ODIN Connector Invest (BUY/SELL) Button API
| Field | Value |
|---|---|
| Name | ODIN Connector Invest (BUY/SELL) Button API |
| URL | https://odinconnector-apiuat.63moons.com/productmgmtservice/apiButtonRequest |
| Description | Basket execution using Buy/Sell button via button API |
| Method | POST |
🏷️ Request
Header
Content-Type: application/json
Body
| Parameter | Data Type | Mandatory/Optional | Description |
|---|---|---|---|
| sessionId | String | M | Session received from Persistence Login Request |
| sRecoId | String (varchar 6) | M | Unique per each basket rebalance |
| sClientCode | String (varchar 50) | M | Third party application user id |
| basketData | Array | M | Array of basket scrip to be buy/sell |
info
For basket data scrip details, refer to Order Details.
Example Request
{
"sessionId": "XYZ",
"sRecoId": "01F5h9",
"sClientCode": "connector",
"basketData": [
{
"ordPrice": 0,
"ordGTD1": 1,
"prodType": "DELIVERY",
"orderSide": "BUY",
"sLTriggerPrice": 0,
"buyOrSell": "1",
"sLOrderPrice": 0,
"orgQTY": 500,
"mktSegId": 1,
"days": "0",
"scripTkn": 12716,
"trigPrice": 0,
"validity": 1,
"ordType": "RL-MKT",
"discQty": 50
}
]
}
📄 Response
| Parameter | Data Type | Mandatory/Optional | Description |
|---|---|---|---|
| Success | Boolean | M | true – Success, false – Failure |
| Data | String | M | URL for redirecting to basket page |
| Message | String | M | Success/Failure message for the API |
| statusCode | String | M | Application status code |
| traceId | String | M | System generated Code by third-party, used for VAS log purpose |
** 🟢 Example Success Response**
{
"success": true,
"data": "http://odinconnectoruat.63moons.com/landing/redirect?sAppToken=ButtonAPI63moonsnode9867283a319&sTwoWayToken=abc&sProductCode=BUTTON-API-1963809e-481a-11ef-9234-ddd0376485c8&sTpUserId=4560A&sPartnerId=0AF1C1&nRequestType=3&sSession=XYZ",
"message": "Url successfully formed",
"statusCode": "vasprd-200-818",
"traceId": "traceId-0001"
}
** 🔴 Example Failure Response**
{
"success": false,
"data": null,
"message": "Invalid session. Please login with your broker and try it",
"statusCode": "vasprd-400-500",
"traceId": "traceId-0001"
}